<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<%@ include file="/commons/kindeditor.jsp" %>
<script type="text/javascript">
    $(function() {
    	//初始化类目选择和图片上传器
		TAOTAO.init({fun:function(node){}});
        $('#countryAddForm').form({
            url : '${path}/admin/country/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    //之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div style="padding:10px 10px 10px 10px">
        <form id="countryAddForm" method="post" enctype="multipart/form-data">
            <table class="grid">
				<tr>
                    <td>中文全称:</td>
					<td>
						<input id="cname" name="cname" type="text" placeholder="请输入中文全称" class="easyui-textbox"  data-options="required:false" />
					</td>
                    <td>中文简称:</td>
					<td>
						<input id="caname" name="caname" type="text" placeholder="请输入中文简称" class="easyui-textbox"  data-options="required:true" />
					</td>
				</tr>
				<tr>
                    <td>英文全称:</td>
					<td>
						<input id="ename" name="ename" type="text" placeholder="请输入英文全称" class="easyui-textbox"  data-options="required:false" />
					</td>
                    <td>英文简称:</td>
					<td>
						<input id="eaname" name="eaname" type="text" placeholder="请输入英文简称" class="easyui-textbox"  data-options="required:false" />
					</td>
				</tr>
				<tr>
                    <td>缩写:</td>
					<td>
						<input id="abbreviation" name="abbreviation" type="text" placeholder="请输入英文简称" class="easyui-textbox"  data-options="required:false" />
					</td>
					<td>所属大洲:</td>
					<td>
						<select id="type" name="type" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'">
							${dic:getBusDictListToOption('COUNTRY_TYPE')}
						</select>
					</td>
				</tr>
				<tr>
					<td>国旗</td>
					<td><a href="javascript:void(0)" class="easyui-linkbutton onePicUpload">上传图片</a>
						<input  type="hidden" name="imgUrl" id="imgUrl"  class="img_url"/>
					</td>
					<td>图标</td>
					<td><a href="javascript:void(0)" class="easyui-linkbutton onePicUpload">上传图片</a>
						<input  type="hidden" name="iocUrl" id="iocUrl"  class="img_url"/>
					</td>
				</tr>
				<%--／＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝--%>
				<tr>
					<td>首都:</td>
					<td>
						<input id="capital" name="capital" type="text" placeholder="请输入首都" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>首都英文:</td>
					<td>
						<input id="capitalEn" name="capitalEn" type="text" placeholder="请输入首都英文" class="easyui-textbox" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td>官方语言:</td>
					<td>
						<input id="language" name="language" type="text" placeholder="请输入官方语言" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>国家面积:</td>
					<td>
						<input id="acreage" name="acreage" type="text" placeholder="请输入国家面积" class="easyui-textbox" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td>国际人口:</td>
					<td>
						<input id="population" name="population" type="text" placeholder="请输入国际人口" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>货币:</td>
					<td>
						<input id="currency" name="currency" type="text" placeholder="请输入货币" class="easyui-textbox" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td>时区:</td>
					<td>
						<input id="timezone" name="timezone" type="text" placeholder="请输入时区" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>宗教:</td>
					<td>
						<input id="religion" name="religion" type="text" placeholder="请输入宗教" class="easyui-textbox" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td>安全:</td>
					<td>
						<input id="security" name="security" type="text" placeholder="请输入安全" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>环境:</td>
					<td>
						<input id="ambient" name="ambient" type="text" placeholder="请输入环境" class="easyui-textbox" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td>战乱:</td>
					<td>
						<input id="war" name="war" type="text" placeholder="请输入战乱" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>签证:</td>
					<td>
						<input id="visa" name="visa" type="text" placeholder="请输入签证" class="easyui-textbox" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td>扩展阅读:</td>
					<td>
						<input id="extend" name="extend" type="text" placeholder="请输入扩展阅读" class="easyui-textbox" data-options="required:true" />
					</td>
					<td>是否在前台展示：</td>
					<td>
						<select id="status" name="status" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'">
							<option value="1">展示</option>
							<option value="0">不展示</option>
						</select>
					</td>
				</tr>

            </table>
        </form>
    </div>